<template>
	<view class="title">
		<uv-text 
			:text="title"
			:size="size || titleSize" 
			:color="color || titleColor"
			:customStyle="{ fontWeight: bold }"
		/>
		<uv-text 
			:text="more" v-if="more"
			:size="size || moreSize" 
			:color="color || moreColor"
			suffixIcon="arrow-right" align="right" @click="moreClick"
			:iconStyle="{ color: color || moreColor, fontSize: size || moreSize }"
		/>
	</view>
</template>

<script>
	export default {
		name: "lst-title",
		emits: ['moreClick'],
		props: {
			title: {
				type: String,
				default: "标题"
			},
			titleSize: {
				type: String,
				default: '30rpx'
			},
			titleColor: {
				type: String,
				default: '#333333'
			},
			bold: {
				type: String,
				default: 'normal'
			},
			more: {
				type: String,
				default: '更多'
			},
			moreSize: {
				type: String,
				default: '24rpx'
			},
			moreColor: {
				type: String,
				default: '#333333'
			},
			size: {
				type: String,
				default: ''
			},
			color: {
				type: String,
				default: ''
			}
		},
		methods: {
			moreClick() {
				this.$emit('moreClick')
			}
		}
	}
</script>

<style lang="scss" scoped>
	.title {
		width: 100%;
		display: flex;
		align-items: center;
		justify-content: space-between;
	}
</style>
